<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 200px;
            height: 200px;
            background-color: pink;
            margin: 100px auto;
        }
        .son {
            width: 100px;
            height: 100px;
            background-color: blue;
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son">

        </div>
    </div>
    <script>
        var father = document.querySelector('.father')
        var son = document.querySelector('.son')
        // mouseover 经过父子盒子都会触发,mouseenter只有经过自己时才会触发,因为他会冒泡d
        // father.addEventListener('mouseover',function(){
        //     console.log('d');
            
        // })
        father.addEventListener('mouseenter',function(){
            console.log('ss');
            
        })
    </script>
</body>
</html>